/**
 * 
 */
package br.edu.flf.teoriagrafos.testes.controle.geral.vos;

import junit.framework.Assert;

import org.junit.Test;

import br.edu.flf.teoriagrafos.controle.geral.vos.grafo.Vertice;

/**
 * Testar a classe VerticeVO.
 * 
 * @author Rafael Santiago
 * Date: 14/03/2012 - Hora: 00:47:26
 */
public class VerticeTest {
	private Vertice vertice = null;

	@Test
	public void toStringTest(){
		vertice = new Vertice();
		vertice.setVertId(1);
		vertice.setVertLabel("Fortaleza");
		vertice.setVertGrau(3);
		vertice.setVertCapacidade(15);

		System.out.println(vertice.toString());
		
		Assert.assertEquals(1, vertice.getVertId());
		Assert.assertEquals("Fortaleza", vertice.getVertLabel());
		Assert.assertEquals(3, vertice.getVertGrau());
		Assert.assertEquals(15, vertice.getVertCapacidade());


		vertice = null;
	}

	@Test
	public void hashCodeTest(){
		vertice = new Vertice();
		vertice.setVertId(1);
		vertice.setVertLabel("Fortaleza");
		vertice.setVertGrau(3);
		vertice.setVertCapacidade(15);

		System.out.println("Label: " + vertice.getVertLabel() + "\nHash Code: " + vertice.hashCode());
		
		Assert.assertEquals(1, vertice.hashCode());
		
		vertice = null;
	}

}
